{extend name='common/dialog'}
{block name='content'}
<div class="row">
    <div class="col-lg-12">
        <div class="card">
            <div class="card-body">
                <form class="form-horizontal" data-toggle="validator" method="POST" role="form" data-loading="3">
                    <div class="form-group">
                        <label for="c-pid" class="control-label">上级菜单</label>
                        <div class="form-item">
                            <select name="row[pid]" class="form-control" data-rule="required" id="c-pid">
                                {foreach $rule_data as $k=>$v}
                                <option value="{$k}" {if $row.pid==$k} selected {/if}>{$v}</option>
                                {/foreach}
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="c-title" class="control-label">标题</label>
                        <div class="form-item">
                            <input type="text" name="row[title]" data-rule="required" id="c-title" class="form-control" value="{$row.title}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="c-pid" class="control-label">地址</label>
                        <div class="form-item">
                            <input type="text" name="row[name]" data-rule="required" id="c-name" class="form-control" value="{$row.name}">
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="c-route_name" class="control-label">icon</label>
                        <div class="input-group">
                            <input type="text" name="row[icon]" id="c-icon" class="form-control" value="{$row.icon}">
                            <div class="input-group-btn"><button class="btn btn-default btn-icon" type="button">搜索图标</button></div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="c-route_name" class="control-label">路由名称</label>
                        <div class="input-group">
                            <input type="text" name="row[route_name]"  id="c-route_name" class="form-control" value="{$row.route_name}">
                            <div class="input-group-btn"><button class="btn btn-default btn-route_name" type="button">查看路由规则</button></div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="c-condition" class="control-label">条件</label>
                        <div class="form-item">
                            <textarea type="text" name="row[condition]" placeholder="例:{id}=3" id="c-condition" class="form-control">{$row.condition}</textarea>
                        </div>
                    </div>
                    <div class="form-group">
                        <label  class="control-label">是否为菜单</label>
                        <div class="form-item">

                            <label class="lyear-radio radio-inline radio-danger" for="c-is_menu-1">
                                <input type="radio" id="c-is_menu-1" name="row[is_menu]" {if $row.is_menu==1} checked {/if} value="1">
                                <span>是</span>
                            </label>
                            <label class="lyear-radio radio-danger radio-inline" for="c-is_menu-0">
                                <input type="radio" id="c-is_menu-0" name="row[is_menu]" {if $row.is_menu==0} checked {/if} value="0">
                                <span>否</span>
                            </label>
                        </div>
                    </div>

                    <div class="form-group hidden layer-footer">
                        <label class="control-label col-xs-12 col-sm-2"></label>
                        <div class="col-xs-12 col-sm-8">
                            <button type="submit" class="btn btn-success btn-embossed disabled">提交</button>
                            <button type="reset" class="btn btn-default btn-embossed">重置</button>
                        </div>
                    </div>

                </form>
            </div>
        </div>
    </div>
</div>
{include file='auth/rule/icon_tpl'/}
{/block}

